package com.wanmait.zaisousuo.mapper;

import com.wanmait.zaisousuo.pojo.Article;
import com.wanmait.zaisousuo.pojo.Garbage;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GarbageMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Garbage record);

    int updateCountById(Integer id);
    int updateReduceCountById(Integer id);

    int insertSelective(Garbage record);

    Garbage selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Garbage garbage);

    int updateByPrimaryKey(Garbage record);

    List<Garbage> findAll();
    List<Garbage> findAllGarbageByConditions(@Param("typeId") Integer typeId, @Param("textureId") Integer textureId);
    List<Garbage> findAllGarbageByState(@Param("state") Integer state);

    List<Garbage> findById(Integer id);
    int updateState(@Param("flag")Boolean flag,@Param("id")Integer id);
    List<Garbage> findGarbageByName(String keyword);


}